import org.junit.Test;

import static org.junit.Assert.*;


public class NGuessNumberTest
{
    @Test
    public void generateAnswerTest()
    {
        int[] arr = NGuessNumber.generateAnswer();
        for(int a = 0 ; a<arr.length ; a++)
        {
            for(int b = 0 ; b<arr.length ; b++)
            {
                if(arr[a] == arr[b] && a != b && (0<=arr[a] && arr[a]<=9))
                {
                    System.out.println("generateAnswer()测试未通过");
                    return;
                }
            }
        }
        System.out.println("generateAnswer()测试通过");
    }
    @Test
    public void getPlayerInputTest()
    {
        int[] arr = NGuessNumber.getPlayerInput();
        if(arr.length == 4)
        {
            System.out.println("getPlayerInput()测试通过");
        }
        else
        {
            System.out.println("getPlayerInput()测试未通过");
        }
    }
}
